package com.winkyle.woodenfish.adapter.holder;

import android.databinding.ViewDataBinding;
import android.support.v7.widget.RecyclerView;

/**
 * @author winkyle
 * @date 2018/06/21
 * @description RecyclerView适配器的数据绑定持有类
 */

public class Holder<T extends ViewDataBinding> extends RecyclerView.ViewHolder {
    private T binding;

    public Holder(T binding) {
        super(binding.getRoot());
        this.binding = binding;
    }

    /**
     * @description 得到数据绑定
     * @return
     */
    public T getBinding() {
        return binding;
    }
}
